package day_13;

import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;

public class ques1 {
    public static void main(String[]args){
        Scanner scan=new Scanner(System.in);
        String str=scan.nextLine();
        Queue<String> queue=new LinkedList<>();
        StringBuffer buffer=new StringBuffer();
        boolean flag=false;
        for(int i=0;i<str.length();i++){
            char ch=str.charAt(i);
            if(ch=='"'){
//                if(!flag){
//
//                    queue.add(buffer.toString());
//                    buffer=new StringBuffer();
//                }
                flag=!flag;
            }
            if(!flag&&ch!=' '&&ch!='"'){
                buffer.append(ch);
            }else if(ch==' '&&flag==false){

                queue.add(buffer.toString());
                buffer=new StringBuffer();
            }
            else if(flag&&ch!='"'){
                buffer.append(ch);

//              buffer=new StringBuffer();
//              flag=!flag;
            }
            if(i==str.length()-1){
                queue.add(buffer.toString());
            }
        }
        System.out.println(queue.size());
        while(!queue.isEmpty()){
            System.out.println(queue.poll());
        }

    }
}
